import { Card, Row, Col, message, Space, Avatar, List, Result } from 'antd';
import React from 'react';
import './userCard.less';
let { Meta } = Card;

export default class UserCard extends React.Component {
  constructor() {
    super();
    this.state = {
      studentInfo: {},
    };
  }

  getAllDrugInfo = async () => {};

  componentDidMount() {
    this.getAllDrugInfo();
  }

  // CreateRcNod=text=><div><span>{text}</span></div>

  render() {
    const columns = [
      { key: 'address', value: '地址' },
      { key: 'age', value: '年龄' },
      { key: 'class', value: '班级' },
      { key: 'header_img', value: '头像' },
      { key: 'idcard', value: '身份证信息' },
      { key: 'parents_name', value: '父母的名字' },
      { key: 'parents_phone', value: '父母的电话号码' },
      { key: 'phone', value: '电话号码' },
      { key: 'previous_history', value: '既往史' },
      { key: 'sex', value: '性别' },
      { key: 'social_security_card', value: '社保卡号' },
      { key: 'username', value: '用户名' },
    ];
    let { studentInfo } = this.state;
    return (
      <div style={{ padding: '30px' }}>
        <Row gutter={16}>
          <Col span="8">
            <Row>
              <Col span="24">
                <Card style={{ height: '130px' }}>
                  <Meta
                    avatar={
                      <Avatar size={64} src={this.props.userinfo.header_img} />
                    }
                    title={this.props.userinfo.username}
                    description={this.props.userinfo.phone}
                  />
                </Card>
              </Col>
              <Col span={24}>
                <Card style={{ height: '130px' }} title="年龄" bordered={false}>
                  {this.props.userinfo.age}
                </Card>
              </Col>
              <Col span={24}>
                <Card style={{ height: '130px' }} title="性别" bordered={false}>
                  {this.props.userinfo.sex}
                </Card>
              </Col>
            </Row>
          </Col>
          <Col span="8">
            <Row>
              <Col span={24}>
                <Card
                  style={{ height: '130px' }}
                  title="身份证信息"
                  bordered={false}
                >
                  {this.props.userinfo.idcard}
                </Card>
              </Col>
              <Col span={24}>
                <Card
                  style={{ height: '130px' }}
                  title="社保卡信息"
                  bordered={false}
                >
                  {this.props.userinfo.social_security_card}
                </Card>
              </Col>
              <Col span={24}>
                <Card
                  style={{ height: '130px' }}
                  title="既往史"
                  bordered={false}
                >
                  {this.props.userinfo.previous_history}
                </Card>
              </Col>
            </Row>
          </Col>
          <Col span="8">
            <Row>
              <Col span={24}>
                <Card
                  style={{ height: '130px' }}
                  title="家庭住址"
                  bordered={false}
                >
                  {this.props.userinfo.address}
                </Card>
              </Col>
              <Col span={24}>
                <Card
                  style={{ height: '130px' }}
                  title="父母亲姓名"
                  bordered={false}
                >
                  {this.props.userinfo.parents_name}
                </Card>
              </Col>
              <Col span={24}>
                <Card
                  style={{ height: '130px' }}
                  title="父母亲电话"
                  bordered={false}
                >
                  {this.props.userinfo.parents_phone}
                </Card>
              </Col>
            </Row>
          </Col>
        </Row>
      </div>
    );
  }
}
